package com.example.K501;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.TextView;

/**
 * This page is where a new user fills out their account details.
 * @author WaltonWellness
 *
 */
public class RegisterActivity extends Activity {

//	EditText inputName;
//    EditText inputEmail;
//    EditText inputPassword;
    
	public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        
        // Set View to register.xml
        setContentView(R.layout.activity_register);
 
        TextView loginScreen = (TextView) findViewById(R.id.link_to_login);
 
        // Listening to Login Screen link
        loginScreen.setOnClickListener(new View.OnClickListener() {
 
            public void onClick(View v) {
                // Closing registration screen
                // Switching to Login Screen/closing register screen
                finish();
            }
        });
        
        
        ImageView registerAccount = (ImageView)findViewById(R.id.ivRegister);	
        registerAccount.setOnClickListener(new View.OnClickListener() {
 
            public void onClick(View v) {
            	//EditText inputName = (EditText) findViewById(R.id.reg_fullname);
                //EditText inputEmail = (EditText) findViewById(R.id.reg_emailaddress);
                //EditText inputPassword = (EditText) findViewById(R.id.reg_password);
				//database.newAccount(inputEmail.getText().toString(), inputPassword.getText().toString());
            	
                //finish();
                
             // Going through the personal history activity
                Intent i = new Intent(getApplicationContext(), PersonalHistoryActivity.class);
              startActivity(i);
            }
        });
    }
}